Command Line Application

Top  Previous  Next

B4aCmd (the command line application of Backup4all) is a small application that runs independently from the main application. It can be used to create batch files. Also if your One Touch Backup button device is not detected by Backup4all (Backup4all is not natively compatible with the device), you could use the command line parameters to create a command that can be associated to the One Touch Backup button of your device. When executed without any parameters it displays the usage information.

 

Syntax

        B4aCmd [{/f|/d|/i|/r|/t|/c}] name | /g group | /otb

 

Formatting legend

        Italic - Information that must be supplied by the user

        Bold - Elements that the user must type exactly as shown

        / - Switches are preceded by slash

        [] - Elements between square brackets are optional

        | - Vertical line separates possible choices

        {} - Items between braces are a set of choices from which the user must choose only one

 

Command line backup can have as parameters an ".ini" file (with its full path), a ".bkc" file (with its full path) or the name of the backup job. The ".ini" or ".bkc" file must exist in the specified path, the backup job must be defined in Backup4all or otherwise the backup will not run.

 

Switches that apply to this parameter (case insensitive, preceded by "/" or "-"):

·/f - force the execution of a full backup
·/d - force the execution of a differential backup
·/i - force the execution of an incremental backup
·/r - execute the backup with its defined type (this is the default behavior when the backup name is specified without switches)
·/e - erase the disc(Floppy/CD/DVD) before backup
·/t - starts the test operation for the named job. Supports also an additional parameter [/TN 1,2,5..20|*|#] - if no TN is set then it will test all backup jobs same as using *; if # is used it will test only the last backup job (# can be used in the same time with other numbers too).
·/c - deletes the .bkc file and all zip files associated with the named backup job

 

If the backup job to be executed has the backup type set to Mirror, then a mirror backup will be performed and the "/f", "/d", "/i" switches will be ignored even if they are set.

 

You can also have as parameter an existing backup group. This group must be defined in Backup4all, otherwise the backup will not run.

Switch to apply to this parameter (case insensitive, preceded by "/" or "-"):

·/g - execute the jobs in the backup group with their defined types (the switch is mandatory if you want to execute a backup group)

 

When called without parameters, but with the "/otb" switch, Backup4all executes the backup job or backup group specified in the OTB settings (from the Tools->Options->One Touch Backup page of Backup4all).

 

Examples

To force a full backup on the backup job associated with the IE Favorites.bkc located in the "E:\\Backup Destination" folder, use:

        B4aCmd /f "E:\Backup Destination\IE Favorites.bkc"

 

To force an incremental backup on the My Documents backup job, use:

        B4aCmd /i "My Documents"

 

To execute all backup jobs from the Samples group, use:

        B4aCmd /g Samples

 

To execute the backup job or backup group associated with the One Touch Backup, use:

        B4aCmd /otb

 

To execute a test for all backup numbers of the My Pictures backup job

        B4aCmd /t "My Pictures" /tn *

 

To execute a test for first two and last backup number of the My Pictures backup job

        B4aCmd /t "My Pictures" /tn 1,2,#

 

Backup job definitions (".ini" files) are saved separately for each Windows user. These files can be found in the "Application Data\Softland\Backup4all 3\IniFiles" folder of your user profile (if it's not changed in the Tools->Options->File locations window). Backup catalogs (".bkc" files) are saved locally and in the backup destination together with the backup archive. When a backup job is executed for the first time, a .bkc file is created. There is only one .bkc file for each backup job.

 

If the parameters are not valid you will be shown the start screen with an appropriate error message. When valid parameters are provided with valid switches B4aCmd will execute the commands. There is a progress meter showing the progress of the backup execution in percents. When the backup finishes and if you have the Test after backup option enabled, then the test operation starts with its own progress.

 

The command line application uses the same engine, same configuration files and the same log files as the main application. It always performs an unattended backup. You can use Backup4all's interface to define backup jobs and backup groups which can be used later as parameters for the command line application. You can create a shortcut to a backup job or to a backup group so you won't have to use complicated paths. To create a shortcut, use the Create Shortcut menu item from the Tools menu.

 

The same license is valid for the command line application as for the main application. Once the main application is licensed the command line application automatically recognizes the license.